package cn.lite3.notepaper.managers 
{
	import flash.utils.getTimer;
	/**
	 * ...
	 * @author lite3
	 */
	public class DataManager
	{
		
		private var delaySaveTime:int = 3000;
		
		private var isNewData:Boolean = false;
		
		private var data:String = "";
		private var prevTime:int = 0;
		
		public function DataManager() 
		{
			
		}
		
		public function sava(data:String):void
		{
			isNewData = true;
			this.data = data;
			
			if (0 == prevTime)
			{
				prevTime = getTimer();
			}else
			{
				if (getTimer() - prevTime >= delaySaveTime)
				{
					prevTime = getTimer();
					savaData();
				}
			}
		}
		
		private function savaData():void
		{
			
		}
	}

}